<template>
    <el-menu router
        style="height: 100%;width: 200px;background-color: rgb(252, 252, 252);box-shadow: var(--el-box-shadow-lighter);">
        
            <el-menu-item @click="hide()">
                <template #title>
                    <el-icon size="20px">
                        <hide />
                    </el-icon>
                    <span>隐藏侧边栏 &lt;&lt;&lt;</span>
                </template>
            </el-menu-item>

            <el-menu-item index="/admin_user">
                <el-icon size="20px">
                    <user />
                </el-icon>
                <span>用户管理</span>
            </el-menu-item>
            <el-menu-item index="/admin_order">
                <el-icon size="20px">
                    <memo />
                </el-icon>
                <span>订单管理</span>
            </el-menu-item>
            <el-menu-item index="/admin_orderItem">
                <el-icon size="20px">
                    <document />
                </el-icon>
                <span>订单详情管理</span>
            </el-menu-item>
            <el-menu-item index="/admin_goods">
                <el-icon size="20px">
                    <goods />
                </el-icon>
                <span>商品管理</span>
            </el-menu-item>
            <el-menu-item index="/admin_type">
                <el-icon size="20px">
                    <collectionTag />
                </el-icon>
                <span>类型管理</span>
            </el-menu-item>
            <el-menu-item index="/admin_recommend">
                <el-icon size="20px">
                    <star />
                </el-icon>
                <span>推荐管理</span>
            </el-menu-item>
            <el-menu-item index="/admin_cart">
                <el-icon size="20px">
                    <shoppingCart />
                </el-icon>
                <span>购物车管理</span>
            </el-menu-item>

    </el-menu>
</template>


<script>
export default {
    methods: {
        hide() {
            this.$store.state.onAdmin = false;
            setTimeout(() => this.$store.state.navActive = '/home', 10)
        }
    },
}
</script>